package array;

public class ArraySort {
  public static void main(String args[]){
	   int[] a = {8,2,3,7,1};
	   for(int i=0;i<a.length-1;i++){
	       for(int j=i+1;j<a.length;j++){
	          if(a[i]>a[j]){
	             int tmp = a[i];
	             a[i] = a[j];
	             a[j] = tmp;
	          }
	       }
	   }
	   print(a);
	}
  public static void print(int[] a){
	  for(int i=0;i<a.length;i++){
		  System.out.print(a[i]+"\t");
	  }
  }
}
